import { defineStore } from 'pinia'
import { store } from '@/store/index'

export interface TableHeaderItem {
  label: string;
  value: string;
  status?: boolean;
  width?: string;
  align?: string;
}

interface TableHeadersState<T> {
  demo: T[];
}

export const useTableHeadersStore = defineStore('headers', {
  state: (): TableHeadersState<TableHeaderItem> => {
    return {
      demo: [
        { label: '预警时间', value: 'warningTime' },
        { label: '预警类别', value: 'category' },
        { label: '位置', value: 'position' }
      ]
    }
  },
  actions: {}
})

export function useTableHeadersStoreWithOut () {
  return useTableHeadersStore(store)
}
